<?xml version="1.0" encoding="utf-8"?>
<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:doc="http://xsltsl.org/xsl/documentation/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="doc" version="1.0">
   <doc:chapter>
      <chapterinfo>
         <author>
            <surname>Ball</surname>
            <firstname>Steve</firstname>
         </author>
         <copyright>
            <year>2001</year>
            <holder>Steve Ball</holder>
         </copyright>
      </chapterinfo>
      <title>XSLT Standard Library Test Suite</title>
      <section>
         <title>About The Test Suite</title>
         <para>This stylesheet tests the stylesheet modules contained in the XSLT Standard Library</para>
      </section>
      <section>
         <title>Running The Tests</title>
         <para>Process the <filename>test.xml</filename> file with the stylesheet <filename>test.xsl</filename> using your favourite XSLT processor.  The result is a text document.  When the tests fail they print a text message, so no news is good news!  Messages are also printed to the console, which is useful for finding those templates which are hanging.</para>
      </section>
   </doc:chapter>
   <axsl:include href="string.test.xsl"/>
   <axsl:include href="date-time.test.xsl"/>
   <axsl:include href="node.test.xsl"/>
   <axsl:include href="uri.test.xsl"/>
   <axsl:output method="text" encoding="UTF-8"/>
   <axsl:template match="tests">
      <axsl:message>Tests starting</axsl:message>
      <axsl:text>Running stylesheet tests

</axsl:text>
      <axsl:call-template name="string"/>
      <axsl:call-template name="date-time"/>
      <axsl:call-template name="node"/>
      <axsl:call-template name="uri"/>
   </axsl:template>
   <axsl:template name="test">
      <axsl:param name="expect"/>
      <axsl:param name="result"/>
      <axsl:param name="description">(no description)</axsl:param>
      <axsl:if test="$expect != $result">
         <axsl:text>
Test </axsl:text>
         <axsl:value-of select="$description"/>
         <axsl:text> failed.
Result was:
</axsl:text>
         <axsl:value-of select="$result"/>
         <axsl:text>
Result should have been:
</axsl:text>
         <axsl:value-of select="$expect"/>
      </axsl:if>
   </axsl:template>
</axsl:stylesheet>